import Detail from '@/views/Movie/Detail'
import NowPlaying from '@/components/NowPlaying'
import ComingSoon from '@/components/ComingSoon'
export default {
    path:'/movie',
    component:()=>import('@/views/Movie'),
    children:[
        // {
        //     path:'login',
        //     component:()=>import('@/components/Login')
        // },
        {
            path:'nowplaying',
            // component:()=>import('@/components/NowPlaying')
            component:NowPlaying
        },
        {
            path:'city',
            component:()=>import('@/components/City')
        },
        {
            path:'comingsoon',
            // component:()=>import('@/components/ComingSoon')
            component:ComingSoon
        },
        {
            path:'search',
            component:()=>import('@/components/Search')
        },
        {
            path:'detail/1/:id',
            // dafault:component:()=>import('@/components/NowPlaying'),
            // component:()=>import('@/views/Movie/Detail')
            components:{
                default: NowPlaying,
                detail:Detail
            }
        },
        {
            path:'detail/2/:id',
            // dafault:component:()=>import('@/components/NowPlaying'),
            // component:()=>import('@/views/Movie/Detail')
            components:{
                default: ComingSoon,
                detail:Detail
            }
        },
        {
            path:'*',
            redirect:'nowplaying'
        }
    ]
}